CREATE TABLE [dbo].[TTLETC_ANUL]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_LETR_CLIE] [dbo].[TD_VC_020] NOT NULL,
[CO_CLIE] [dbo].[TD_VC_020] NULL,
[CO_TIPO_OPER] [dbo].[TD_VC_003] NULL,
[FE_ANUL] [dbo].[TD_DT_001] NULL,
[ST_CONT] [dbo].[TD_VC_001_INTE] NULL CONSTRAINT [DF__TTLETC_AN__ST_CO__204DAB2F] DEFAULT ('N'),
[NU_PROC] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TTLETC_AN__NU_PR__2235F3A1] DEFAULT ((0)),
[NU_ASTO] [dbo].[TD_VC_010] NULL,
[NU_LETR_ANTE] [dbo].[TD_VC_020] NULL,
[NU_RENO] [dbo].[TD_VC_008] NULL,
[FE_RENO] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTLETC_AN__FE_RE__232A17DA] DEFAULT (getdate()),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTLETC_AN__CO_US__241E3C13] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTLETC_AN__FE_US__2512604C] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTLETC_AN__CO_US__26068485] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTLETC_AN__FE_US__26FAA8BE] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTLETC_ANUL] WITH NOCHECK ADD CONSTRAINT [CK__TTLETC_AN__ST_CO__2141CF68] CHECK NOT FOR REPLICATION (([ST_CONT]='P' OR [ST_CONT]='N'))
GO
ALTER TABLE [dbo].[TTLETC_ANUL] ADD CONSTRAINT [PK__TTLETC_A__14412DCE540D4657] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_LETR_CLIE]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTLETC_ANUL] ADD CONSTRAINT [FK__TTLETC_ANUL__5FD3FEBE] FOREIGN KEY ([CO_EMPR], [NU_LETR_CLIE]) REFERENCES [dbo].[TMLETR_CLIE] ([CO_EMPR], [NU_LETR_CLIE])
GO
